package com.example.frameboot.common;

import com.google.common.base.Splitter;

import java.util.Map;

/**
 * @author: limeng8@centaline.com.cn
 * @date 2021/8/25 10:43
 */
public class UrlUtils {


    public static String getParamFromUrl(String url, String name) {
        String params = url.substring(url.indexOf("?") + 1, url.length());
        Map<String, String> split = Splitter.on("&").withKeyValueSeparator("=").split(params);
        return split.get(name);
    }
}
